package com.concurrent.sample.business.manager;

import com.concurrent.sample.business.dto.trade.BaseTradeEventParam;
import com.concurrent.sample.business.dto.trade.CreateTradeEventParamParam;
import com.concurrent.sample.business.dto.trade.TradeExecReportParamParam;

public interface ITradeEventService {

  /**
   * 是否支持处理改交易类型
   * @param baseTradeEvent
   * @return
   */
  boolean support(BaseTradeEventParam baseTradeEvent);

  /**
   * 交易前置条件是否满足，注意，需要封装校验 DTO 对象，里面有资金、持仓的数据，没有的话就去查 DB
   * @param createTradeEventParam
   */
  void enableTrade(CreateTradeEventParamParam createTradeEventParam);

  /**
   * 交易处理主体逻辑
   * @param createTradeEventParam
   */
  void handleTrade(CreateTradeEventParamParam createTradeEventParam);

  /**
   * 交易成交回报处理逻辑
   * @param tradeExecReportParam
   */
  void handleTradeExecReport(TradeExecReportParamParam tradeExecReportParam);

}
